package com.mydemo.springlearning.functions.object_mapper;

import com.mydemo.springlearning.functions.object_mapper.po.Car;
import com.mydemo.springlearning.functions.object_mapper.po.CarDto;
import com.mydemo.springlearning.functions.object_mapper.po.UserDTO;
import com.mydemo.springlearning.functions.object_mapper.po.UserInfoVO;

/**
 * @author hd
 * @date 2022-07-26 10:19
 * @description 测试mapper的main方法
 */
public class MyMapperTestMain {
    public static void main(String[] args) {
        Car car = Car.builder().make("铝合金").numberOfSeats(20).type("乘用").build();
        car.setMake("钛合金");
        System.out.println(car);
        CarDto carDto = CarMapper.INSTANCE.carToCarDto(car);
        System.out.println(carDto);




        UserDTO userDTO =  UserDTO.builder().address("伏见寺稻荷区").age(88).gender(0).build();
        userDTO.setName("jack");
        UserInfoVO userInfoVO = InfoConverter.INSTANT.convert(userDTO);
        System.out.println(userInfoVO);
    }

}
